<p class="Paragraph">ArrayName: Name of the array for which to return the upper (<span class="T1">Ubound</span>) or lower (<span class="T1">LBound</span>) limit of the array dimension.</p>
<p class="Paragraph">[Dimension] : Integer that specifies which dimension to return the upper(<span class="T1">Ubound</span>) or lower (<span class="T1">LBound</span>) boundary for. If no value is specified, the first dimension is assumed.</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleUboundLbound</p>
<p class="PropText">Dim sVar(10 to 20) As String</p>
<p class="PropText">print LBound(sVar())</p>
<p class="PropText">print UBound(sVar())</p>
<p class="PropText">end Sub</p>
<p class="PropText">Sub ExampleUboundLbound2</p>
<p class="PropText">Dim sVar(10 to 20,5 To 70) As String</p>
<p class="PropText">Print LBound(sVar()) REM Returns 10</p>
<p class="PropText">Print UBound(sVar()) REM Returns 20</p>
<p class="PropText">Print LBound(sVar(),2) REM Returns 5</p>
<p class="PropText">Print UBound(sVar(),2) REM Returns 70</p>